//
//  HomeViewController.m
//  LifeAssistant
//
//  Created by zhubaoshi on 15/5/11.
//  Copyright (c) 2015年 tonychb. All rights reserved.
//

#import "HomeViewController.h"
#import "MainTabBarController.h"
#import "RotateAnimationView.h"


@interface HomeViewController ()<RotateAnimationViewDelegate>


@end

@implementation HomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = kViewBackGroundColor;
    
    RotateAnimationView *rotateAnimationView = [RotateAnimationView rotateAnimationViewWithFrame:self.view.bounds rotateItemSize:CGSizeMake(50, 50)];
    rotateAnimationView.animationViewBackgroundColor = [UIColor whiteColor];
    rotateAnimationView.centralFigureImage = [UIImage imageNamed:@"lifeassistant_1"];
    rotateAnimationView.delegate = self;
    rotateAnimationView.rotateItemTitles = @[@"翻译"];
    rotateAnimationView.rotateItemTitleColor = [UIColor whiteColor];
    rotateAnimationView.rotateItemImages = @[@"global_selected"];
    [rotateAnimationView creatingSurroundAnimationWithClockwise:NO rotateItemCount:1];
    [self.view addSubview:rotateAnimationView];
}

#pragma mark - RotateAnimationViewDelegate
- (void)rotateAnimationViewWithRotateItem:(RotateItem *)rotateItem index:(NSInteger)index {

    MyLog(@"第%ld个按钮点击了!",(long)index);
    
    switch (index) {
        case 1:
        {
            self.view.window.rootViewController = [[MainTabBarController alloc]init];
        }
            break;
            
        default:
            break;
    }
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
